package com.myway.dto.flight;

import com.myway.dto.currencyrate.domain.Currency;
import com.myway.dto.flight.domain.TripType;
import com.myway.dto.order.domain.Inventory;

import java.io.Serializable;
import java.util.Date;

/**
 * 类名称：DTOSearchParam 
 * 类描述：TODO 航班查询参数
 * 创建时间：2015年10月26日 下午4:30:40 
 * @author Jiang.Yida
 * @version V1.0
 */
public class DTOSearchParam implements Serializable {
	
	/**
	 * serial version UID
	 */
	private static final long serialVersionUID = 2161423850371121784L;
	private String orgCity;
	private String dstCity;
	private Date date;//旅行日期
	private String airlineCode;
	private TripType tripType;
	private Inventory inventory;
	private int index;
	private Currency unit;
	
	private String flightNo;
	
	/**
	 * 设定是否多查几天以后的航班
	 */
	private int dayAhead = 0;
	
	/**
	 * minPrice: 最小金额 
	 */
	private double minPrice=-1;
	
	/**
	 * maxPrice: 最大金额 
	 */
	private double maxPrice=-1;
	
	/**
	 * beginTravelDate: 开始日期 
	 */
	private Date beginDate;
	
	/**
	 * endTravelDate: 结束日期/返程日期
	 */
	private Date endDate;
	
	/**
	 * @return the orgCity
	 */
	public String getOrgCity() {
		return this.orgCity;
	}
	/**
	 * @param orgCity the orgCity to set
	 */
	public void setOrgCity(String orgCity) {
		this.orgCity = orgCity;
	}
	/**
	 * @return the dstCity
	 */
	public String getDstCity() {
		return this.dstCity;
	}
	/**
	 * @param dstCity the dstCity to set
	 */
	public void setDstCity(String dstCity) {
		this.dstCity = dstCity;
	}
	/**
	 * @return the date
	 */
	public Date getDate() {
		return this.date;
	}
	/**
	 * @param date the date to set
	 */
	public void setDate(Date date) {
		this.date = date;
	}
	/**
	 * @return the airlineCode
	 */
	public String getAirlineCode() {
		return this.airlineCode;
	}
	/**
	 * @param airlineCode the airlineCode to set
	 */
	public void setAirlineCode(String airlineCode) {
		this.airlineCode = airlineCode;
	}
	
	
	
	/**
	 * @return the tripType
	 */
	public TripType getTripType() {
		return this.tripType;
	}
	/**
	 * @param tripType the tripType to set
	 */
	public void setTripType(TripType tripType) {
		this.tripType = tripType;
	}
	
	
	/**
	 * @return the index
	 */
	public int getIndex() {
		return this.index;
	}
	/**
	 * @param index the index to set
	 */
	public void setIndex(int index) {
		this.index = index;
	}
//	public String[] toArray(){
//		return new String[]{orgCity,dstCity,DateUtils.dateToString(date)};
//	}
	@Override
	public String toString() {
		StringBuffer s=new StringBuffer();
		s.append("Search Flight criteria:\n")
		.append("Flight router :")
		.append(this.orgCity)
		.append("-").append(this.dstCity)
		.append(" ;Date :").append(this.date).append(" ;Trip Type :")
		.append(this.tripType)
		.append(" ;Index :" + this.index)
		.append(" ;Inventory :" + this.inventory)
		.append(" ;Search days ahead :" + this.dayAhead);
		return s.toString();
	}
	public Inventory getInventory() {
		return inventory;
	}
	public void setInventory(Inventory inventory) {
		this.inventory = inventory;
	}
	public int getDayAhead() {
		return dayAhead;
	}
	public void setDayAhead(int dayAhead) {
		this.dayAhead = dayAhead;
	}
	
	public Currency getUnit() {
		return unit;
	}
	public void setUnit(Currency unit) {
		this.unit = unit;
	}
	public double getMinPrice() {
		return minPrice;
	}
	public void setMinPrice(double minPrice) {
		this.minPrice = minPrice;
	}
	public double getMaxPrice() {
		return maxPrice;
	}
	public void setMaxPrice(double maxPrice) {
		this.maxPrice = maxPrice;
	}
	public Date getBeginDate() {
		return beginDate;
	}
	public void setBeginDate(Date beginDate) {
		this.beginDate = beginDate;
	}
	public Date getEndDate() {
		return endDate;
	}
	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}
	public String getFlightNo() {
		return flightNo;
	}
	public void setFlightNo(String flightNo) {
		this.flightNo = flightNo;
	}
	
}
